package Observer_Strategy;

//具体策略类B
public class AggressiveStrategy implements StockPriceStrategy {
    @Override
    public void applyStrategy(double price) {
        System.out.println("激进策略：股价变化幅度大于 3% 时执行操作");
        if (price > 1.03) {
            System.out.println("执行买入操作");
        } else if (price < 0.97) {
            System.out.println("执行卖出操作");
        } else {
            System.out.println("保持观望");
        }
    }
}
